{% extends "standard.html" %}

{% block title %} OCRopodium - Tasks {% endblock %}

{% block headerscript %}

{% endblock %}


{% block content %}

<script type="text/javascript">
$(document).ready(function() {
    $("li.success").slideDown(3000).delay(1000).fadeOut();
    
});

</script>

<div id="sidebar">
    <h4 id="filter_head">Filter Tasks:</h4>
    <form id="task_filter_form" method="GET" action="/ocrtasks/list">
        <input type="hidden" class="filter_item" name="page" value="{{params.page}}" />
        <input type="hidden" class="filter_item" name="order_by" value="{{params.order_by}}" />

        <div class="field_wrapper">
            <label for="view_status_all">All:</label>            
            <input type="checkbox" name="status" class="filter_item" id="view_status_all" value="ALL"
                checked="checked" />
            <br />
            {% for status, name in statuses %}
                <label for="view_status_{{status}}">{{name}}:</label>
                <input type="checkbox" name="status" class="filter_item" id="view_status_{{status}}" 
                {% if status in selected %} checked="Checked" {% endif %} value="{{status}}" />
                <br />
            {% endfor %}
        </div>
        <div class="field_wrapper">
            <label for="filter_user">User:</label>
            <select class="filter_item" id="filter_user" name="batch__user__pk">
                <option value="" {% ifequal params.user_id "" %}selected="selected"{% endifequal %}>All</option>
                <option value="{{request.user.pk}}" {% ifequal params.user_id request.user.pk %}selected="selected"
                {% endifequal %}>{{user.username}}</option>
            </select>
        </div>
    </form>
</div>

<div class="innercontent">

    {% if messages %}
    <ul class="messages">
    {% for message in messages %}
        <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
    </ul>
    {% endif %}

    {% block innercontent %}

    {% endblock %}
</div>

{% endblock %}
